package br.com.rfqx.account.services;

import java.util.List;

import lombok.Getter;
import lombok.Setter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import br.com.rfqx.account.Customer;
import br.com.rfqx.account.repository.CustomerRepository;

@Getter
@Setter
@Service
public class CustomerServices {
	
	@Autowired
	private CustomerRepository repository;
	
	public CustomerServices() {
	}
	
	@Transactional
	public void save(Customer customer) {
		repository.save(customer);
	}

	public List<Customer> list(){
		return repository.findAll();
	}
	
}	